home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / makefile.tc < prev    next >
Makefile  |  1991-07-11  |  15KB  |  392 lines

  1. #
  2. # MAKEFILE.TC: Borland Make file for TECO-C
  3. # Last updated: 17 July 1990
  4. #
  5. # Command line:
  6. #
  7. #    make -fmakefile.tc [-D80186]    [-DALL]     [-DINCDIR=?]
  8. #               [-DLIBDIR=?] [-DMAP]     [-DMODEL=?]
  9. #               [-DNODEBUG]  [-DTCPP100]
  10. #
  11. # -D80186
  12. #
  13. #    The default is to compile for the 8086.  If you have an 80186 or
  14. #    an 80286, -D80186 will supposedly enable some 80186 instructions
  15. #    like ENTER/LEAVE and PUSH <immediate data>.
  16. #
  17. #    I don't think ENTER and LEAVE are generated if a function doesn't
  18. #    have any local variables.  I think ENTER and LEAVE are slower
  19. #    than the standard function entry/exit sequence; but they can
  20. #    end up being smaller (?).
  21. #
  22. #    PUSH <immediate data> means a number can be pushed directly on
  23. #    the stack (ie: PUSH 10) instead of loading the number into a
  24. #    register first and then pushing the register (ie MOV AX, 10 !
  25. #    PUSH AX).  Saves a minuscule amount of space; and is faster, so
  26. #    why not?
  27. #
  28. # -DALL
  29. #
  30. #    The default is to compile a TECO-C module and add it to the TECOC.LIB
  31. #    library.  If you're compiling all the modules from scratch, -DALL will
  32. #    compile every module first, then build the TECOC.LIB library which is
  33. #    much faster.
  34. #
  35. # -DINCDIR=?
  36. #
  37. #    I have my Turbo C libraries in C:\TC\INCLUDE
  38. #
  39. # -DLIBDIR=?
  40. #
  41. #    I have my Turbo C libraries in C:\TC\LIB
  42. #
  43. # -DMAP
  44. #
  45. #    The default is to not generate a TLINK .MAP file.  The CHECKSUM_CODE
  46. #    #define in ZPORT.H enables runtime code checksumming to insure that
  47. #    code isn't being overwritten by stray pointers.  The checksumming
  48. #    routines in TECOC.C require a current TLINK C .MAP file in order to
  49. #    work, so if you enable the CHECKSUM_CODE option, be sure to compile
  50. #    with -DMAP; and be sure you have an up-to-date .MAP file when running
  51. #    with code checksumming.  Note: CHECKSUM_CODE doesn't work with Turbo
  52. #    Debugger since TD modifies code as it runs.
  53. #
  54. # -DMODEL=?
  55. #
  56. #    Memory Model macro.  '?' is one of the following:
  57. #
  58. #    s    small    (near code, near data)
  59. #    c    compact    (near code, far  data)
  60. #    m    medium    (far  code, near data)
  61. #    l    large    (far  code, far  data, 64K static data)
  62. #    h    huge    (far  code, far  data, 64K static data per module)
  63. #
  64. #    If DEBUGGING is TRUE in ZPORT.H you will have to use the large
  65. #    or huge model to get large (far) code.  If DEBUGGING is FALSE
  66. #    in ZPORT.H you can use the compact model to get small (near) code.
  67. #
  68. #    Stay with a large (far) data model.  TECO-C uses huge pointers and
  69. #    we wouldn't want to send a huge pointer to a small data model C
  70. #    library routine which expects a near pointer.
  71. #
  72. #    There *is* code in ZPORT.H which has been used to allow debugging
  73. #    completely under the small data model (look for __SMALL__), although
  74. #    there many problems.  Do not use the small (near) data models.
  75. #
  76. # -DNODEBUG
  77. #
  78. #    The default is to include stack checking (tcc -N, see STKCHK below)
  79. #    and Turbo Debugger (tcc -v) code.  For production versions of TECO-C
  80. #    use -DNODEBUG.  This will disable stack checking (tcc -N-), disable
  81. #    Turbo Debugger (tcc -v-), enable jump and register optimizations
  82. #    (tcc -O -Z), generate for speed (-G), merge duplicate strings
  83. #    (tcc -d) and use the Pascal function calling sequence (tcc -p)
  84. #    to generate smaller and faster function calls.
  85. #
  86. #    Note:  this NODEBUG switch has *nothing* to do with the internal
  87. #    debugging code enabled by setting DEBUGGING on in ZPORT.H.
  88. #
  89. # -DTCPP100
  90. #
  91. #    There is a conflict in Turbo C++ v1.00 between large model and
  92. #    stack checking.  If TCPP is defined and we're including TD debugging
  93. #    code (implying we're debugging in large model?), then disable stack
  94. #    checking.
  95. #
  96.  
  97. !if !$d(MODEL)        # if no model defined on the command line
  98. !if $d(NODEBUG)        #   if we're not debugging
  99. MODEL=c            #     use the compact model
  100. !else            #   else
  101. MODEL=l            #     use the large model
  102. !endif            #   endif
  103. !endif            # endif
  104.  
  105. !if !$d(LIBDIR)        # if no library directory on the command line
  106. LIBDIR=c:\tc\lib    #   use my Turbo C library directory
  107. !endif            # endif
  108.  
  109.  
  110. CSTARTUP=$(LIBDIR)\c0$(MODEL)
  111. CLIB=$(LIBDIR)\c$(MODEL)
  112.  
  113. #
  114. # TCC options:
  115. #
  116. #    -1    80186/286 Instructions        (only if you have a 186+)
  117. #    -G    Generate for speed        (not debugging)
  118. #    -Idir    Include file directory
  119. #    -K    Default char is unsigned
  120. #    -N    Check stack overflow        (debugging)
  121. #    -O    Optimize jumps            (not debugging)
  122. #    -Z    Optimize register usage        (not debugging)
  123. #    -c    Compile only
  124. #    -d    Merge duplicate strings        (not debugging)
  125. #    -m?    memory model (? = c or l)
  126. #    -p    use Pascal function calls    (not deubgging)
  127. #    -v    Source level debugging        (debugging)
  128. #    -w    Enable all warnings
  129. #
  130.  
  131. COMPILE=tcc -c -m$(MODEL) -w -K
  132.  
  133. !if $d(NODEBUG)                # if we're not debugging
  134. COMPILE=$(COMPILE) -G -O -Z -d -p    #   do optimizations
  135. !else                    # else
  136. COMPILE=$(COMPILE) -v            #   compile for Turbo Debugger
  137. !if !$d(TCPP100))            #   if not TC++
  138. COMPILE=$(COMPILE) -N            #     compile for stack checking
  139. !endif                    #   endif
  140. !endif                    # endif
  141.  
  142. !if $d(80186)                # if we're on a 80186 or better
  143. COMPILE=$(COMPILE) -1            #   enable 80186 code
  144. !endif                    # endif
  145.  
  146. !if $d(INCDIR)
  147. COMPILE=$(COMPILE) -I$(INCDIR)
  148. !endif
  149.  
  150. #
  151. # TLINK options:
  152. #
  153. #    /c    lower case significant in symbols
  154. #    /d    warn if duplicate symbols in libraries
  155. #    /i    initialize all segments
  156. #    /l    include source line numbers
  157. #    /m    map file with publics
  158. #    /s    detailed map of segments
  159. #    /v    include full symbolic debug information
  160. #    /x    no map file at all
  161. #
  162.  
  163. LINK=tlink /c /d /i
  164.  
  165. !if !$d(NODEBUG)
  166. LINK=$(LINK) /v /l
  167. !endif
  168.  
  169. !if $d(MAP)
  170. LINK=$(LINK) /m /s
  171. !else
  172. LINK=$(LINK) /x
  173. !endif
  174.  
  175. #
  176. # TLIB options:
  177. #
  178. #    /c    case sensitive library
  179. #    /e    create extended dictionary
  180. #
  181.  
  182. TLIB_OP=/c
  183.  
  184. !if $d(NODEBUG)
  185. TLIB_OP=$(TLIB_OP) /e
  186. !endif
  187.  
  188. #
  189. # how to make the TECOC.EXE file
  190. #
  191.  
  192. !if $d(MAP)        # include zfirst.obj, make a .MAP file
  193.  
  194. tecoc.exe : zfirst.obj tecoc.obj tecoc.lib
  195.  $(LINK) $(CSTARTUP) zfirst.obj tecoc,tecoc,tecoc,tecoc $(CLIB)
  196.  
  197. !else            # don't include zfirst.obj, don't make .MAP file
  198.  
  199. tecoc.exe : tecoc.obj tecoc.lib
  200.  $(LINK) $(CSTARTUP) tecoc,tecoc,,tecoc $(CLIB)
  201.  
  202. !endif
  203.  
  204. #
  205. # how to make the TECOC.OBJ module
  206. #
  207.  
  208. tecoc.obj  : tecoc.c zport.h tecoc.h defext.h deferr.h dscren.h
  209.  $(COMPILE) tecoc.c
  210.  
  211. #
  212. # what constitutes the TECOC.LIB library
  213. #
  214.  
  215. TECOC_OBJS=\
  216.     baksrc.obj bldstr.obj clenup.obj cmatch.obj docjr.obj  doeves.obj \
  217.     doflag.obj echoit.obj err.obj    exeats.obj exea.obj   exebar.obj \
  218.     exebsl.obj exeb.obj   execcc.obj execln.obj execom.obj execrt.obj \
  219.     execst.obj execta.obj exectc.obj exectd.obj execte.obj execti.obj \
  220.     exectl.obj exectn.obj execto.obj exectp.obj exectq.obj exectr.obj \
  221.     exects.obj exectt.obj exectu.obj exectv.obj exectw.obj exectx.obj \
  222.     execty.obj exectz.obj exec.obj   exedgt.obj exedot.obj exedqu.obj \
  223.     exed.obj   exeequ.obj exeesc.obj exeexc.obj exeey.obj  exee.obj \
  224.     exefb.obj  exef.obj   exegtr.obj exeg.obj   exeh.obj   exeill.obj \
  225.     exei.obj   exej.obj   exek.obj   exelbr.obj exelst.obj exel.obj \
  226.     exem.obj   exenul.obj exenyi.obj exen.obj   exeopr.obj exeo.obj \
  227.     exeprc.obj exepw.obj  exep.obj   exeqes.obj exeq.obj   exerbr.obj \
  228.     exertp.obj exer.obj   exescl.obj exes.obj   exet.obj   exeund.obj \
  229.     exeusc.obj exeu.obj   exev.obj   exew.obj   exex.obj   exey.obj \
  230.     exez.obj   findes.obj findqr.obj flowec.obj flowee.obj flowel.obj \
  231.     getara.obj getnma.obj inccbp.obj init.obj   insstr.obj isradx.obj \
  232.     ln2chr.obj makdbf.obj makrom.obj popmac.obj pshmac.obj pushex.obj \
  233.     rdline.obj rdpage.obj readcs.obj replac.obj search.obj singlp.obj \
  234.     skpcmd.obj srclop.obj sserch.obj tabort.obj typbuf.obj typest.obj \
  235.     uminus.obj wrpage.obj zfrsrc.obj zmsdos.obj
  236.  
  237. #
  238. # how to make the TECOC.LIB library
  239. #
  240.  
  241. !if $d(ALL)            #build entire library at once
  242.  
  243. tecoc.lib : $(TECOC_OBJS) tctlib.rsp
  244.  del tecoc.lib
  245.  tlib $(TLIB_OP) tecoc.lib @tctlib.rsp
  246.  
  247. .c.obj:
  248.  $(COMPILE) $*.c
  249.  
  250. !else                #modules added to library after compile
  251.  
  252. tecoc.lib : $(TECOC_OBJS)
  253.  
  254. .c.obj:
  255.  $(COMPILE) $*.c
  256.  tlib $(TLIB_OP) tecoc.lib -+$*.obj
  257.  
  258. !endif
  259.  
  260. #
  261. # The CHECKSUM_CODE routines use the ZFirst() function in ZFIRST.C
  262. # to get an idea of where the first code module is located in memory
  263. # when TECO-C is loaded.
  264. #
  265.  
  266. zfirst.obj : zfirst.c
  267.  
  268. #
  269. # the TECOC.LIB library modules.
  270. #
  271.  
  272. baksrc.obj : baksrc.c zport.h tecoc.h defext.h dchars.h chmacs.h deferr.h
  273. bldstr.obj : bldstr.c zport.h tecoc.h defext.h deferr.h dchars.h chmacs.h
  274. clenup.obj : clenup.c zport.h tecoc.h defext.h
  275. cmatch.obj : cmatch.c zport.h tecoc.h defext.h dchars.h chmacs.h deferr.h
  276. docjr.obj  : docjr.c  zport.h tecoc.h defext.h deferr.h
  277. doeves.obj : doeves.c zport.h tecoc.h defext.h dchars.h
  278. doflag.obj : doflag.c zport.h tecoc.h defext.h
  279. echoit.obj : echoit.c zport.h tecoc.h defext.h dchars.h
  280. err.obj    : err.c    zport.h tecoc.h defext.h chmacs.h deferr.h dchars.h
  281. exea.obj   : exea.c   zport.h tecoc.h defext.h deferr.h
  282. exeats.obj : exeats.c zport.h tecoc.h defext.h
  283. exeb.obj   : exeb.c   zport.h tecoc.h defext.h
  284. exebar.obj : exebar.c zport.h tecoc.h defext.h deferr.h
  285. exebsl.obj : exebsl.c zport.h tecoc.h defext.h chmacs.h
  286. exec.obj   : exec.c   zport.h tecoc.h defext.h
  287. execcc.obj : execcc.c zport.h tecoc.h defext.h deferr.h
  288. execln.obj : execln.c zport.h tecoc.h defext.h
  289. execom.obj : execom.c zport.h tecoc.h defext.h deferr.h
  290. execrt.obj : execrt.c zport.h tecoc.h defext.h chmacs.h deferr.h
  291. execst.obj : execst.c zport.h tecoc.h defext.h deferr.h
  292. execta.obj : execta.c zport.h tecoc.h defext.h dchars.h
  293. exectc.obj : exectc.c zport.h tecoc.h defext.h dchars.h
  294. exectd.obj : exectd.c zport.h tecoc.h defext.h
  295. execte.obj : execte.c zport.h tecoc.h defext.h
  296. execti.obj : execti.c zport.h tecoc.h defext.h dchars.h
  297. exectl.obj : exectl.c zport.h tecoc.h defext.h dchars.h
  298. exectn.obj : exectn.c zport.h tecoc.h defext.h
  299. execto.obj : execto.c zport.h tecoc.h defext.h
  300. exectp.obj : exectp.c zport.h tecoc.h defext.h
  301. exectq.obj : exectq.c zport.h tecoc.h defext.h
  302. exectr.obj : exectr.c zport.h tecoc.h defext.h deferr.h
  303. exects.obj : exects.c zport.h tecoc.h defext.h
  304. exectt.obj : exectt.c zport.h tecoc.h defext.h deferr.h
  305. exectu.obj : exectu.c zport.h tecoc.h defext.h deferr.h dchars.h
  306. exectv.obj : exectv.c zport.h tecoc.h defext.h deferr.h
  307. exectw.obj : exectw.c zport.h tecoc.h defext.h deferr.h
  308. exectx.obj : exectx.c zport.h tecoc.h defext.h
  309. execty.obj : execty.c zport.h tecoc.h defext.h
  310. exectz.obj : exectz.c zport.h tecoc.h defext.h
  311. exed.obj   : exed.c   zport.h tecoc.h defext.h deferr.h
  312. exedgt.obj : exedgt.c zport.h tecoc.h defext.h deferr.h chmacs.h
  313. exedot.obj : exedot.c zport.h tecoc.h defext.h
  314. exedqu.obj : exedqu.c zport.h tecoc.h defext.h deferr.h chmacs.h
  315. exee.obj   : exee.c   zport.h tecoc.h defext.h chmacs.h dchars.h deferr.h
  316. exeequ.obj : exeequ.c zport.h tecoc.h defext.h dchars.h deferr.h
  317. exeesc.obj : exeesc.c zport.h tecoc.h defext.h dchars.h
  318. exeexc.obj : exeexc.c zport.h tecoc.h defext.h
  319. exeey.obj  : exeey.c  zport.h tecoc.h defext.h
  320. exef.obj   : exef.c   zport.h tecoc.h defext.h chmacs.h deferr.h
  321. exefb.obj  : exefb.c  zport.h tecoc.h defext.h deferr.h
  322. exeg.obj   : exeg.c   zport.h tecoc.h defext.h deferr.h
  323. exegtr.obj : exegtr.c zport.h tecoc.h defext.h deferr.h
  324. exeh.obj   : exeh.c   zport.h tecoc.h defext.h
  325. exei.obj   : exei.c   zport.h tecoc.h defext.h dchars.h deferr.h
  326. exeill.obj : exeill.c zport.h tecoc.h defext.h deferr.h
  327. exej.obj   : exej.c   zport.h tecoc.h defext.h
  328. exek.obj   : exek.c   zport.h tecoc.h defext.h
  329. exel.obj   : exel.c   zport.h tecoc.h defext.h
  330. exelbr.obj : exelbr.c zport.h tecoc.h defext.h deferr.h
  331. exelst.obj : exelst.c zport.h tecoc.h defext.h deferr.h
  332. exem.obj   : exem.c   zport.h tecoc.h defext.h deferr.h
  333. exen.obj   : exen.c   zport.h tecoc.h defext.h deferr.h
  334. exenul.obj : exenul.c zport.h tecoc.h defext.h
  335. exenyi.obj : exenyi.c zport.h tecoc.h defext.h deferr.h
  336. exeo.obj   : exeo.c   zport.h tecoc.h defext.h dchars.h deferr.h
  337. exeopr.obj : exeopr.c zport.h tecoc.h defext.h
  338. exep.obj   : exep.c   zport.h tecoc.h defext.h deferr.h
  339. exeprc.obj : exeprc.c zport.h tecoc.h defext.h deferr.h
  340. exepw.obj  : exepw.c  zport.h tecoc.h defext.h
  341. exeq.obj   : exeq.c   zport.h tecoc.h defext.h deferr.h
  342. exeqes.obj : exeqes.c zport.h tecoc.h defext.h
  343. exer.obj   : exer.c   zport.h tecoc.h defext.h
  344. exerbr.obj : exerbr.c zport.h tecoc.h defext.h deferr.h
  345. exertp.obj : exertp.c zport.h tecoc.h defext.h deferr.h
  346. exes.obj   : exes.c   zport.h tecoc.h defext.h dchars.h deferr.h
  347. exescl.obj : exescl.c zport.h tecoc.h defext.h deferr.h
  348. exet.obj   : exet.c   zport.h tecoc.h defext.h dchars.h
  349. exeu.obj   : exeu.c   zport.h tecoc.h defext.h deferr.h
  350. exeund.obj : exeund.c zport.h tecoc.h defext.h deferr.h
  351. exeusc.obj : exeusc.c zport.h tecoc.h defext.h dchars.h
  352. exev.obj   : exev.c   zport.h tecoc.h defext.h
  353. exew.obj   : exew.c   zport.h tecoc.h defext.h dscren.h
  354. exex.obj   : exex.c   zport.h tecoc.h defext.h deferr.h
  355. exey.obj   : exey.c   zport.h tecoc.h defext.h deferr.h
  356. exez.obj   : exez.c   zport.h tecoc.h defext.h
  357. findes.obj : findes.c zport.h tecoc.h defext.h deferr.h
  358. findqr.obj : findqr.c zport.h tecoc.h defext.h deferr.h chmacs.h
  359. flowec.obj : flowec.c zport.h tecoc.h defext.h deferr.h
  360. flowee.obj : flowee.c zport.h tecoc.h defext.h deferr.h
  361. flowel.obj : flowel.c zport.h tecoc.h defext.h deferr.h
  362. getara.obj : getara.c zport.h tecoc.h defext.h deferr.h
  363. getnma.obj : getnma.c zport.h tecoc.h defext.h deferr.h
  364. inccbp.obj : inccbp.c zport.h tecoc.h defext.h deferr.h
  365. init.obj   : init.c   zport.h tecoc.h defext.h deferr.h
  366. insstr.obj : insstr.c zport.h tecoc.h defext.h deferr.h
  367. isradx.obj : isradx.c zport.h tecoc.h defext.h chmacs.h
  368. ln2chr.obj : ln2chr.c zport.h tecoc.h defext.h dchars.h chmacs.h
  369. makdbf.obj : makdbf.c zport.h tecoc.h defext.h
  370. makrom.obj : makrom.c zport.h tecoc.h defext.h deferr.h
  371. popmac.obj : popmac.c zport.h tecoc.h defext.h
  372. pshmac.obj : pshmac.c zport.h tecoc.h defext.h deferr.h
  373. pushex.obj : pushex.c zport.h tecoc.h defext.h dchars.h deferr.h
  374. rdline.obj : rdline.c zport.h tecoc.h defext.h deferr.h dchars.h
  375. rdpage.obj : rdpage.c zport.h tecoc.h defext.h deferr.h
  376. readcs.obj : readcs.c zport.h tecoc.h defext.h dchars.h chmacs.h deferr.h \
  377.              dscren.h
  378. replac.obj : replac.c zport.h tecoc.h defext.h dchars.h
  379. search.obj : search.c zport.h tecoc.h defext.h deferr.h dchars.h
  380. singlp.obj : singlp.c zport.h tecoc.h defext.h dchars.h
  381. skpcmd.obj : skpcmd.c zport.h tecoc.h defext.h chmacs.h dchars.h deferr.h
  382. srclop.obj : srclop.c zport.h tecoc.h defext.h deferr.h
  383. sserch.obj : sserch.c zport.h tecoc.h defext.h
  384. tabort.obj : tabort.c zport.h tecoc.h
  385. typbuf.obj : typbuf.c zport.h tecoc.h defext.h dchars.h chmacs.h
  386. typest.obj : typest.c zport.h tecoc.h defext.h dchars.h
  387. uminus.obj : uminus.c zport.h tecoc.h defext.h
  388. wrpage.obj : wrpage.c zport.h tecoc.h defext.h dchars.h deferr.h
  389. zfrsrc.obj : zfrsrc.c zport.h tecoc.h defext.h dchars.h chmacs.h deferr.h
  390. zmsdos.obj : zmsdos.c zport.h tecoc.h defext.h chmacs.h clpars.h deferr.h \
  391.              dchars.h dscren.h vrbmsg.h
  392.